package shop.services.manage.activityJoin.dao.impl;

import org.springframework.stereotype.Repository;
import shop.core.common.dao.BaseDao;
import shop.core.common.dao.page.PagerModel;
import shop.services.manage.activityJoin.bean.ActivityJoin;
import shop.services.manage.activityJoin.dao.ActivityJoinDao;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2017/6/2.
 */
@Repository("activityJoinDaoManage")
public class ActivityJoinDaoImpl implements ActivityJoinDao {
    @Resource
    private BaseDao dao;
    public void setDao(BaseDao dao){this.dao = dao;}

    @Override
    public int insert(ActivityJoin activityJoin) {
        return dao.insert("manage.activityJoin.insert", activityJoin);
    }

    @Override
    public int delete(ActivityJoin activityJoin) {
        return dao.delete("manage.activityJoin.delete", activityJoin);
    }

    @Override
    public int update(ActivityJoin activityJoin) {
        return dao.update("manage.activityJoin.update", activityJoin);
    }

    @Override
    public ActivityJoin selectOne(ActivityJoin activityJoin) {
        return (ActivityJoin)dao.selectOne("manage.activityJoin.selectOne", activityJoin);
    }

    @Override
    public PagerModel selectPageList(ActivityJoin activityJoin) {
        return dao.selectPageList("manage.activity.selectPageList",
                "manage.activity.selectPageCount", activityJoin);
    }

    @Override
    public List<ActivityJoin> selectList(ActivityJoin activityJoin) {
        return dao.selectList("manage.activity.selectList", activityJoin);
    }

    @Override
    public int deleteById(int id) {
        return 0;
    }

    @Override
    public ActivityJoin selectById(String id) {
        return null;
    }
}
